import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;



public class OutputStreamDemo {
	public static void main(String[] args) throws IOException{
		//byte[] b = new byte[]{97,119,100,123,122,97,98};
		
		InputStream in = new FileInputStream("D:\\workspace\\JavaProExample9\\src\\1.txt");
		byte[] b = new byte[1024];
		in.read(b);
		
		OutputStream out = new FileOutputStream("D:\\workspace\\JavaProExample9\\src\\2.txt");
		out.write(b);
		out.close();
		
	}

}
